package com.heo.music.player.converter;

import com.heo.music.player.dto.output.MusicInfoOutput;
import com.heo.music.player.entity.MusicInfo;
import org.modelmapper.ModelMapper;
import org.springframework.stereotype.Component;

/**
 * created on 2024-05-11 13:41
 *
 * @author 星天无极
 **/
@Component
public class MusicInfoConverter extends AbstractConverter<MusicInfo, MusicInfoOutput> {
    public MusicInfoConverter(ModelMapper modelMapper) {
        super(modelMapper);
    }

    @Override
    public MusicInfoOutput convert(MusicInfo musicInfo) {
        return modelMapper.map(musicInfo, MusicInfoOutput.class);
    }
}
